import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/login&register/login.vue')
    },
    {
      path:"/home",
      name:"Home",
      component:()=>import('../views/home'),
      redirect:"/toApply",
      children:[
        {
          path:"/toApply",
          name:"ToApply",
          component:()=>import('../views/home/toApply')
        },
        {
          path:"/my",
          name:"My",
          component:()=>import('../views/home/my')
        }
      ]
    }
  ]
})